﻿using System.Windows.Media;

namespace TeBigScreenWpf.Common
{
    public static class Themes
    {
        public static Brush CreateLinearGradientBrush(Color baseColor, double fromBrightness, double toBrightness, double angle)
        {
            var fromColor = ColorHelper.Brightness(baseColor, fromBrightness);
            var toColor = ColorHelper.Brightness(baseColor, toBrightness);

            return new LinearGradientBrush(fromColor, toColor, angle);
        }

        public static class LoginWindow
        {
            public static Brush Background { get; set; }
                  = new LinearGradientBrush(new GradientStopCollection
             {
                    new GradientStop(Color.FromArgb(0xff, 0x0f, 0x0c, 0x29), 1.00),
                    new GradientStop(Color.FromArgb(0xff, 0x00, 0x12, 0x3a), 0.50),
                    new GradientStop(Color.FromArgb(0xff, 0x24, 0x24, 0x3e), 0.00),
             });

            public static Brush Border { get; set; }
                = new LinearGradientBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), Color.FromArgb(0xFF, 0x64, 0x9f, 0xc9), 90);

            public static Brush Foreground { get; set; }
                = new LinearGradientBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), Color.FromArgb(0xFF, 0x64, 0x9f, 0xc9), 90);
        }

        public static class MainWindow
        {
            public static Brush Background { get; set; }
             = new LinearGradientBrush(new GradientStopCollection
             {
                    new GradientStop(Color.FromArgb(0xff, 0x0f, 0x0c, 0x29), 1.00),
                    new GradientStop(Color.FromArgb(0xff, 0x00, 0x12, 0x3a), 0.50),
                    new GradientStop(Color.FromArgb(0xff, 0x24, 0x24, 0x3e), 0.00),
             });

            public static Brush Title_Foreground { get; set; }
                = new LinearGradientBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), Color.FromArgb(0xFF, 0x64, 0x9f, 0xc9), 90);

            public static Brush SubTitle_Foreground { get; set; }
                = new LinearGradientBrush(Color.FromArgb(0xdF, 0xFF, 0xFF, 0xFF), Color.FromArgb(0xdF, 0x64, 0x9f, 0xc9), 90);
        }

        public static class MainView
        {
            public static class Map
            {
                public static Brush Shape_Background { get; set; }
                    = new SolidColorBrush(Color.FromArgb(0x7f, 0x07, 0x4d, 0xf2));

                public static Brush ShapeBorder_Background { get; set; }
                   = new SolidColorBrush(Color.FromArgb(0x7F, 0x96, 0xa6, 0xcb));

                public static Brush LineLayer_Background { get; set; }
                    = new SolidColorBrush(Color.FromArgb(0x19, 0x97, 0xe4, 0xdd));

                public static Brush LineLayer_Foreground { get; set; }
                    = new SolidColorBrush(Color.FromArgb(0xFF, 0x97, 0xe4, 0xdd));
            }

            public static Brush Banner_Foreground { get; set; }
                = new LinearGradientBrush(Colors.White, Colors.Yellow, 90);

            public static Brush Footer_Title_Foreground { get; set; }
                = new LinearGradientBrush(Colors.White, Colors.Yellow, 90);

            public static Brush Footer_SubTitle_Foreground { get; set; }
                = new LinearGradientBrush(Colors.White, Colors.Gray, 90);

            public static Brush Footer_Item_Title_Foreground { get; set; }
               = new LinearGradientBrush(Colors.White, Colors.GreenYellow, 90);

            public static Brush Footer_Item_Foreground { get; set; }
                = new LinearGradientBrush(Colors.White, Colors.Gray, 90);
        }

        public static class Page
        {
            public static Brush Duty_Foreground { get; set; }
                = CreateLinearGradientBrush(Color.FromArgb(0xFF, 0x7d, 0xc0, 0x1f), 0.5, 0, 90);

            public static Brush Weather_Foreground { get; set; }
                = CreateLinearGradientBrush(Color.FromArgb(0xFF, 0x7d, 0xc0, 0x1f), 0.5, 0, 90);

            public static Brush Achievement_Foreground { get; set; }
                = CreateLinearGradientBrush(Color.FromArgb(0xFF, 0xed, 0x6e, 0x24), 0.5, 0, 90);
        }

        public static class Map
        {
            public static Brush Shape_Background { get; set; }
                = new SolidColorBrush(Color.FromArgb(0x7f, 0x07, 0x4d, 0xf2));

            public static Brush ShapeBorder_Background { get; set; }
               = new SolidColorBrush(Color.FromArgb(0x7F, 0x96, 0xa6, 0xcb));

            public static Brush LineLayer_Background { get; set; }
                = new SolidColorBrush(Color.FromArgb(0x19, 0x97, 0xe4, 0xdd));

            public static Brush LineLayer_Foreground { get; set; }
                = new SolidColorBrush(Color.FromArgb(0xFF, 0x97, 0xe4, 0xdd));
        }

        public static class CircularGaugeControl
        {
            public static Brush Needle_Foreground { get; set; }
                = new SolidColorBrush(Color.FromArgb(0xff, 0x44, 0x5A, 0x65));

            public static Brush CenterText_Foreground { get; set; }
               = CreateLinearGradientBrush(Color.FromArgb(0xff, 0x7F, 0xD1, 0xF5), 0, -0.5, 90);

            public static Brush Tickmark_Seperator { get; set; }
                = new SolidColorBrush(Color.FromArgb(0xff, 0x02, 0x11, 0x34));

            public static Brush Tickmark_Background { get; set; }
                = new SolidColorBrush(Color.FromArgb(0xff, 0x60, 0x5e, 0x6d));

            public static Brush Tickmark_Foreground { get; set; }
                = new SolidColorBrush(Color.FromArgb(0xff, 0x5c, 0xa8, 0xd5));
        }

        public static class TeBannerGroup
        {
            public static Brush borderBackground = new SolidColorBrush(Color.FromArgb(0x19, 0x70, 0x98, 0xCA));
            public static Brush borderForeground = new SolidColorBrush(Color.FromArgb(0xff, 0x70, 0x98, 0xCA));
            public static Brush brushBackground = new SolidColorBrush(Color.FromArgb(0x19, 0x70, 0x98, 0xCA));
        }

        public static class TeFooterGroup
        {
            public static Brush brushBackground = new LinearGradientBrush(
                Color.FromArgb(0x30, 0xff, 0xff, 0xff),
                Color.FromArgb(0x30, 0x70, 0x98, 0xCA), 90);
        }

        public static class TeTitleGroup
        {
            public static Brush CenterLineBrushBackground = new SolidColorBrush(Color.FromArgb(0x19, 0x70, 0x98, 0xCA));
            public static Brush CenterLineBrushForeground = new SolidColorBrush(Color.FromArgb(0xff, 0x70, 0x98, 0xCA));

            public static Brush LeftWingsLineBrush = new LinearGradientBrush(
                Color.FromArgb(0xff, 0x00, 0x3A, 0x7A),
                Color.FromArgb(0xff, 0x70, 0x98, 0xCA),
                0);

            public static Brush RightWingsLineBrush = new LinearGradientBrush(
                Color.FromArgb(0xff, 0x70, 0x98, 0xCA),
                Color.FromArgb(0xff, 0x00, 0x3A, 0x7A),
                0);
        }

        public static class TeCustomGroup
        {
            public static Brush colorBackGround = new SolidColorBrush(Color.FromArgb(0x30, 0x02, 0x12, 0x2c));

            public static Brush colorCorner = new SolidColorBrush(Color.FromArgb(0xaf, 0x1a, 0x9d, 0xd5));

            public static Brush colorBorder =
                new SolidColorBrush(Color.FromArgb(0x7f, 0x2c, 0x7d, 0xc9));

            public static Brush colorCaption = new SolidColorBrush(Color.FromArgb(0xff, 0x1c, 0x3f, 0x63));

            public static Brush colorText
                = CreateLinearGradientBrush(Color.FromArgb(0x7f, 255, 255, 255), 0.2, 0, 90);
        }

        public static class MarqueeNewsControl
        {
            public static Brush Foreground { get; set; }
               = CreateLinearGradientBrush(Color.FromArgb(0xdF, 0x17, 0x6b, 0xb1), 0.2, 0.3, 90);
        }

        public static class GridControl
        {
            public static Brush Foreground { get; set; }
                = CreateLinearGradientBrush(Color.FromArgb(0xff, 255, 204, 0), 0.5, 0, 90);
        }
    }
}